package com.coocaa.ops.admin.v1.plugin.service.business;

import com.alibaba.fastjson.JSONArray;
import com.coocaa.ops.admin.v1.plugin.biz.IPluginInfoBiz;
import com.coocaa.ops.admin.v1.plugin.model.output.PluginInfoModel;
import com.coocaa.ops.admin.v1.plugin.util.PluginInfoConverter;
import com.coocaa.ops.common.core.base.model.PageResultModel;
import com.coocaa.ops.common.core.biz.module.constant.ModuleTypeConstants;
import com.coocaa.ops.common.core.biz.plugin.entity.PluginInfoEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tangminghong
 * @date 2020-07-20
 */
//@Service(ModuleTypeConstants.MOVIE)
public class MoviePluginServiceTestImpl implements IPluginBusinessService {

    @Autowired
    private IPluginInfoBiz pluginInfoBiz;

    @Override
    public PageResultModel<PluginInfoModel> pageList(Integer page, Integer rows) {
        return null;
    }

    private static final String TEMP_PLUGIN_JSON_LIST = "[\n" +
            "    {\n" +
            "        \"pluginId\":\"101\",\n" +
            "        \"pluginName\":\"星爷最热电影\",\n" +
            "        \"type\":\"TYPE_RANK\",\n" +
            "        \"params\" : {\n" +
            "            \"title\" : \"星爷最热电影\",\n" +
            "            \"poster\" : \"http://mmtest.skyworth-cloud.com/4Kvideo/shenzhen/guohanfeng/pic/2.png\",\n" +
            "            \"poster_radiu\" : 17,\n" +
            "            \"ranks\" : [\n" +
            "                {\n" +
            "                    \"name\" : \"功夫\",\n" +
            "                    \"score\" : \"10分\",\n" +
            "                    \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.detailinfo\\\",\\\"params\\\":{\\\"id\\\":\\\"_oqy_210200201\\\"},\\\"exception\\\":{}}\"\n" +
            "                },\n" +
            "                {\n" +
            "                    \"name\" : \"千王之王\",\n" +
            "                    \"score\" : \"10分\",\n" +
            "                    \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.detailinfo\\\",\\\"params\\\":{\\\"id\\\":\\\"_oqy_210200201\\\"},\\\"exception\\\":{}}\"\n" +
            "                },\n" +
            "                {\n" +
            "                    \"name\" : \"整蛊专家\",\n" +
            "                    \"score\" : \"10分\",\n" +
            "                    \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.detailinfo\\\",\\\"params\\\":{\\\"id\\\":\\\"_oqy_210200201\\\"},\\\"exception\\\":{}}\"\n" +
            "                },\n" +
            "                {\n" +
            "                    \"name\" : \"长江七号\",\n" +
            "                    \"score\" : \"10分\",\n" +
            "                    \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.detailinfo\\\",\\\"params\\\":{\\\"id\\\":\\\"_oqy_210200201\\\"},\\\"exception\\\":{}}\"\n" +
            "                },\n" +
            "                {\n" +
            "                    \"name\" : \"三叉戟之海王奇迹\",\n" +
            "                    \"score\" : \"10分\",\n" +
            "                    \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.detailinfo\\\",\\\"params\\\":{\\\"id\\\":\\\"_oqy_210200201\\\"},\\\"exception\\\":{}}\"\n" +
            "                },\n" +
            "                {\n" +
            "                    \"name\" : \"大内密探零零发\",\n" +
            "                    \"score\" : \"10分\",\n" +
            "                    \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.detailinfo\\\",\\\"params\\\":{\\\"id\\\":\\\"_oqy_210200201\\\"},\\\"exception\\\":{}}\"\n" +
            "                }\n" +
            "            ],\n" +
            "            \"canFocusItem\" : true\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginName\":\"热门电视剧\",\n" +
            "        \"pluginId\":\"102\",\n" +
            "        \"type\":\"TYPE_POSTER\",\n" +
            "        \"params\" : {\n" +
            "            \"poster_radiu\" : 17,\n" +
            "            \"canFocusItem\" : false,\n" +
            "            \"title\" : \"热门电视剧\",\n" +
            "            \"poster\" : \"http://mmtest.skyworth-cloud.com/4Kvideo/shenzhen/guohanfeng/pic/3.png\",\n" +
            "            \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.detailinfo\\\",\\\"params\\\":{\\\"id\\\":\\\"_oqy_210200201\\\"},\\\"exception\\\":{}}\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"103\",\n" +
            "        \"pluginName\":\"搜索\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"search\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"104\",\n" +
            "        \"pluginName\":\"收藏\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"collection\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"105\",\n" +
            "        \"pluginName\":\"特殊\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"special\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"106\",\n" +
            "        \"pluginName\":\"购买\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"buy\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"107\",\n" +
            "        \"pluginName\":\"书籍\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"book\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"108\",\n" +
            "        \"pluginName\":\"播放历史\",\n" +
            "        \"type\":\"TYPE_HISTORY\"\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"109\",\n" +
            "        \"pluginName\":\"游戏\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"plugin\",\n" +
            "            \"title\" : \"游戏\",\n" +
            "            \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.list\\\",\\\"params\\\":{\\\"id\\\":\\\"_cc_22\\\"},\\\"exception\\\":{}}\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"110\",\n" +
            "        \"pluginName\":\"电影\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"plugin\",\n" +
            "            \"title\" : \"电影\",\n" +
            "            \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.list\\\",\\\"params\\\":{\\\"id\\\":\\\"_cc_4\\\"},\\\"exception\\\":{}}\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"111\",\n" +
            "        \"pluginName\":\"电视剧\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"plugin\",\n" +
            "            \"title\" : \"电视剧\",\n" +
            "            \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.list\\\",\\\"params\\\":{\\\"id\\\":\\\"_cc_1\\\"},\\\"exception\\\":{}}\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"112\",\n" +
            "        \"pluginName\":\"综艺\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"plugin\",\n" +
            "            \"title\" : \"综艺\",\n" +
            "            \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.list\\\",\\\"params\\\":{\\\"id\\\":\\\"_cc_5\\\"},\\\"exception\\\":{}}\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"113\",\n" +
            "        \"pluginName\":\"动漫\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"plugin\",\n" +
            "            \"title\" : \"动漫\",\n" +
            "            \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.list\\\",\\\"params\\\":{\\\"id\\\":\\\"_cc_2\\\"},\\\"exception\\\":{}}\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"114\",\n" +
            "        \"pluginName\":\"戏曲\",\n" +
            "        \"type\":\"TYPE_SHORTCUT\",\n" +
            "        \"params\" : {\n" +
            "            \"type\" : \"plugin\",\n" +
            "            \"title\" : \"戏曲\",\n" +
            "            \"action\" : \"{\\\"packagename\\\":\\\"com.tianci.movieplatform\\\",\\\"versioncode\\\":\\\"-1\\\",\\\"dowhat\\\":\\\"startActivity\\\",\\\"bywhat\\\":\\\"action\\\",\\\"byvalue\\\":\\\"coocaa.intent.movie.list\\\",\\\"params\\\":{\\\"id\\\":\\\"_cc_34\\\"},\\\"exception\\\":{}}\"\n" +
            "        }\n" +
            "    },\n" +
            "    {\n" +
            "        \"pluginId\":\"115\",\n" +
            "        \"pluginName\":\"我的会员\",\n" +
            "        \"type\":\"TYPE_VIP\"\n" +
            "    }\n" +
            "]\n";
}
